package com.ruoyi.flow.common;

import org.activiti.engine.identity.Group;
import org.activiti.engine.identity.User;

import java.util.Objects;

/**
 * 用于下拉选择组件的统一展示
 * Created by fenghuo on 2018/8/24.
 */
public class SelectOption {
    private String id;//用于opiton的value值
    private String name;//用于option的展示的值

    public SelectOption(User user) {
        this.id = user.getId();
        this.name = Objects.toString(user.getFirstName(), "") + Objects.toString(user.getLastName(), "");
    }

    public SelectOption(Group group) {
        this.id = group.getId();
        this.name = group.getName();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
